﻿<br />
<div class="code">
&#64;model&nbsp;ProfitModel<br />
<br />
&lt;p&gt;Enter&nbsp;profile:&nbsp;&lt;input&nbsp;&#64;Html.KoAttrValue(m&nbsp;=&gt;&nbsp;m.Profit,&nbsp;KoValueUpdate.AfterKeyDown)/&gt;&lt;/p&gt;<br />
<br />
&lt;p&gt;Profit&nbsp;(negative&nbsp;is&nbsp;red,&nbsp;more&nbsp;than&nbsp;10&nbsp;is&nbsp;green):<br />&lt;span&nbsp;&#64;Html.KoAttrText(m&nbsp;=&gt;&nbsp;m.Profit).KoAttrCSS(<span class="String">"good"</span>,&nbsp;m&nbsp;=&gt;&nbsp;m.Profit&nbsp;&gt;&nbsp;10).KoAttrCSS(<span class="String">"bad"</span>,&nbsp;m&nbsp;=&gt;&nbsp;m.Profit&nbsp;&lt;&nbsp;0)&gt;&lt;/span&gt;&lt;/p&gt;<br />
<br />
<br />
&#64;Model.ApplyBindingsScript(KoBindingOptions.IncludeData)
</div>